;(function($){
    var sselect =function(options){
        var $id = $(this).get(0).id
        var deflut ={url:"",id:""}
        var exd = $.extend({},deflut,options);
        var $url = exd.url
        getData($url,$id)

    }
    function getData(url,id){
        $.ajax({
            url : url, //所需要的列表接口地址
            type : "get",
            dataType : "json",
            success : function(data) {
                getSelect(data,id);

            }
        });
    }
    function getSelect(data,id){
        var h = "";
            $.each(data.data, function(key, value) {//拼接option
                h += "<option value='" + key + "'>" + value + "</option>";
            })
        $("#"+id).append(h)
    }
    $.fn.sselect = sselect;
})(jQuery)